/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controle.controladores;

/**
 *
 * @author Taeko
 */
class Derivativo extends ControladorAbstrato{
    
    private double erroAnterior = 0;
    
    public Derivativo(double Kd){
        super(0, 0, Kd);
    }

    @Override
    public double valorControle(double entrada, double h) {
        double valor = (Kd*(entrada - erroAnterior))/h;
        
        erroAnterior = entrada;
        
        return valor;
    }
   
}
